package org.datacoder.geocoding.datastructures.rectangles

import org.datacoder.geocoding.datastructures.geoshapes.*
import org.datacoder.geocoding.datastructures.util.*

class LayeredSubIntervalTreeNode {

    LayeredSubIntervalTreeNode left
    LayeredSubIntervalTreeNode right
    double center

    SortedSet<GeoRectangle> geoRectanglesByStart
    SortedSet<GeoRectangle> geoRectanglesByEnd

    public LayeredSubIntervalTreeNode(){
        geoRectanglesByStart = new TreeSet<GeoRectangle>(new GeoRectangleStartPointComparator(GeoShape.LAT))
        geoRectanglesByEnd = new TreeSet<GeoRectangle>(new GeoRectangleEndPointComparator(GeoShape.LAT))
    }
    public void addGeoRectangle(GeoRectangle gr){
        geoRectanglesByStart.add(gr)
        geoRectanglesByEnd.add(gr)
    }

}

